package com.banyuan.domain;

import java.io.Serializable;
import java.util.*;

public class Person implements Serializable {
    private String name;
    private Integer age;
    private String[] arr;
    private List<String> list;
    private Set<String> set;
    private Map<String,String> map;
    private Properties properties;

    public Person() {
    }

    public Person(String name, Integer age, String[] arr, List<String> list, Set<String> set, Map<String, String> map, Properties properties) {
        this.name = name;
        this.age = age;
        this.arr = arr;
        this.list = list;
        this.set = set;
        this.map = map;
        this.properties = properties;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String[] getArr() {
        return arr;
    }

    public void setArr(String[] arr) {
        this.arr = arr;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public Set<String> getSet() {
        return set;
    }

    public void setSet(Set<String> set) {
        this.set = set;
    }

    public Map<String, String> getMap() {
        return map;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", arr=" + Arrays.toString(arr) +
                ", list=" + list +
                ", set=" + set +
                ", map=" + map +
                ", properties=" + properties +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Person person = (Person) o;
        return Objects.equals(name, person.name) && Objects.equals(age, person.age) && Arrays.equals(arr, person.arr) && Objects.equals(list, person.list) && Objects.equals(set, person.set) && Objects.equals(map, person.map) && Objects.equals(properties, person.properties);
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(name, age, list, set, map, properties);
        result = 31 * result + Arrays.hashCode(arr);
        return result;
    }
    public void init() {
        System.out.println("init~~~~~~~~~~~~~~~");
    }
}
